import router from './router';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import useSettingsStore from '@/stores/modules/settings'




NProgress.configure({ showSpinner: false });
// 白名单，不需要登录
const whiteList = ['/login'];

router.beforeEach((to, from, next) => {
  NProgress.start();
  to.meta.title && useSettingsStore().setTitle(to.meta.title);
  next();
});

router.afterEach(() => {
  NProgress.done();
})
